Optimal. Leaf size=114 \[ \frac{\cos (e+f x) (a \sin (e+f x)+a)^{m+1} (c-c \sin (e+f x))^{-m-2}}{a c^2 f \left (4 m^2+16 m+15\right )}+\frac{\cos (e+f x) (a \sin (e+f x)+a)^{m+1} (c-c \sin (e+f x))^{-m-3}}{a c f (2 m+5)} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.334502, antiderivative size = 114, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 38, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.079, Rules used = {2841, 2743, 2742} \[ \frac{\cos (e+f x) (a \sin (e+f x)+a)^{m+1} (c-c \sin (e+f x))^{-m-2}}{a c^2 f \left (4 m^2+16 m+15\right )}+\frac{\cos (e+f x) (a \sin (e+f x)+a)^{m+1} (c-c \sin (e+f x))^{-m-3}}{a c f (2 m+5)} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2841
Rule 2743
Rule 2742
Rubi steps
\begin{align*} \int \cos ^2(e+f x) (a+a \sin (e+f x))^m (c-c \sin (e+f x))^{-4-m} \, dx &=\frac{\int (a+a \sin (e+f x))^{1+m} (c-c \sin (e+f x))^{-3-m} \, dx}{a c}\\ &=\frac{\cos (e+f x) (a+a \sin (e+f x))^{1+m} (c-c \sin (e+f x))^{-3-m}}{a c f (5+2 m)}+\frac{\int (a+a \sin (e+f x))^{1+m} (c-c \sin (e+f x))^{-2-m} \, dx}{a c^2 (5+2 m)}\\ &=\frac{\cos (e+f x) (a+a \sin (e+f x))^{1+m} (c-c \sin (e+f x))^{-3-m}}{a c f (5+2 m)}+\frac{\cos (e+f x) (a+a \sin (e+f x))^{1+m} (c-c \sin (e+f x))^{-2-m}}{a c^2 f (3+2 m) (5+2 m)}\\ \end{align*}
Mathematica [A] time = 12.662, size = 142, normalized size = 1.25 \[ -\frac{2^{-m-1} \cos ^3\left (\frac{1}{2} \left (-e-f x+\frac{\pi }{2}\right )\right ) \sin ^{-2 m-5}\left (\frac{1}{2} \left (-e-f x+\frac{\pi }{2}\right )\right ) (\sin (e+f x)-2 (m+2)) (a \sin (e+f x)+a)^m (c-c \sin (e+f x))^{-m-4} \left (\cos \left (\frac{1}{2} (e+f x)\right )-\sin \left (\frac{1}{2} (e+f x)\right )\right )^{-2 (-m-4)}}{f (2 m+3) (2 m+5)} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F] time = 0.817, size = 0, normalized size = 0. \begin{align*} \int \left ( \cos \left ( fx+e \right ) \right ) ^{2} \left ( a+a\sin \left ( fx+e \right ) \right ) ^{m} \left ( c-c\sin \left ( fx+e \right ) \right ) ^{-4-m}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int{\left (a \sin \left (f x + e\right ) + a\right )}^{m}{\left (-c \sin \left (f x + e\right ) + c\right )}^{-m - 4} \cos \left (f x + e\right )^{2}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.76837, size = 186, normalized size = 1.63 \begin{align*} \frac{{\left (2 \,{\left (m + 2\right )} \cos \left (f x + e\right )^{3} - \cos \left (f x + e\right )^{3} \sin \left (f x + e\right )\right )}{\left (a \sin \left (f x + e\right ) + a\right )}^{m}{\left (-c \sin \left (f x + e\right ) + c\right )}^{-m - 4}}{4 \, f m^{2} + 16 \, f m + 15 \, f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]